//package com.smartstate.dataManagement.controller;
//
//
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.smartstate.dataManagement.entity.DeviceCarePlanEntity;
//import com.smartstate.dataManagement.entity.EmployeeSchedu;
//import com.smartstate.dataManagement.entity.User;
//import com.smartstate.dataManagement.service.impl.ScheduServiceImpl;
//import com.smartstate.dataManagement.util.StringUtils;
//import com.smartstate.dataManagement.vo.ResultVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//@RestController
//@Api(tags = {"班组控制器 废弃"})
//@RequestMapping("/employe")
//@Slf4j
//public class ScheduController {
//    @Autowired
//    ScheduServiceImpl scheduService;
//
//
//    @PostMapping("/getListByName")
//    @ApiOperation(value = "根据员工姓名获取列表 , 列表数据分页获取")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "name",value = "姓名", required = false),
//    }
//    )
//    public Page<EmployeeSchedu> getListByName(@RequestParam(required = false) String name) {
//        return scheduService.getListByName(name);
//    }
//
//
//
//    @PostMapping("/addEmployee")
//    @ApiOperation(value = "新增员工排班数据")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "loginId",value = "当前登录的用户ID", required = true),
//    }
//    )
//    public ResultVO<Boolean> addEmployeeSchedule(@RequestParam String loginId,@RequestBody  EmployeeSchedu employeeSchedu)  {
//        if(StringUtils.isNotBlank(loginId) && StringUtils.isNotBlank(employeeSchedu.getName()) && StringUtils.isNotBlank(employeeSchedu.getType())
//                && StringUtils.isNotBlank(employeeSchedu.getPhone()) && StringUtils.isNotBlank(employeeSchedu.getScheduTime())){
//            return ResultVO.ok(scheduService.addEmploySchedu(loginId,employeeSchedu));
//        }
//        return ResultVO.fail("参数缺失，请求失败");
//    }
//
//
//    @PostMapping("/updateEmplByID")
//    @ApiOperation(value = "更新员工排班计划")
////    @ApiImplicitParams({
////            @ApiImplicitParam(name = "id",value = "id", required = true),
////            @ApiImplicitParam(name = "scheduTime",value = "排班时间", required = true),
////            @ApiImplicitParam(name = "type",value = "排班类型（1 是晚班，0是早班）", required = true),
////    }
////    )
//    public ResultVO<Boolean> updateEmplByID(@RequestBody EmployeeSchedu employeeSchedu) {
//        if(StringUtils.isNotBlank(employeeSchedu.getScheduTime())
//                &&  StringUtils.isNotBlank(employeeSchedu.getType())
//                &&  StringUtils.isNotBlank(String.valueOf(employeeSchedu.getId()))){
//            return ResultVO.ok(scheduService.updateByID(employeeSchedu));
//        }
//        return ResultVO.fail("参数缺失，请求失败");
//    }
//
//
//
//    @PostMapping("/delByID")
//    @ApiOperation(value = "根据ID删除单条数据")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",value = "id", required = true),
//    }
//    )
//    public ResultVO<Boolean> delByID(@RequestParam("id")String id) {
//        if(StringUtils.isNotBlank(id)){
//            return ResultVO.ok(scheduService.deleteById(id));
//        }
//        return ResultVO.fail("参数缺失，请求失败");
//    }
//
//
//
//
//    @PostMapping("/batchDelByIDS")
//    @ApiOperation(value = "根据ID集合批量删除数据")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "ids",value = "ids", required = true),
//    }
//    )
//    public ResultVO<Boolean> batchDelByIDS(@RequestBody List<String> ids) {
//        if(ids.size()>0){
//            return ResultVO.ok(scheduService.batchDelByIds(ids));
//        }
//        return ResultVO.fail("参数缺失，请求失败");
//    }
//
//
//
//
//
//}
